﻿<%@ Page Title="" Language="C#" MasterPageFile="MasterPage.master" AutoEventWireup="true" CodeFile="MedicalTeams.aspx.cs" Inherits="MedicalTeams" %>

<%@ Register Src="menu.ascx" TagPrefix="uc1" TagName="menu" %>




<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
      <!-- Page Content -->

    <link href="css/DrCss.css" rel="stylesheet" />
    <link href="css/star-rating.css" rel="stylesheet" />
    <script src="js/jquery-ui.min.js"></script>
    <script src="js/star-ratings.js"></script>

  <script>
  $(function() {
    $( "#accordion" ).accordion({
      collapsible: true
    });
  });  //左邊的JQuery UI

  $.fn.rating.defaults = {
      stars: 5,
      glyphicon: true,
      symbol: null,
      disabled: false,
      readonly: false,
      rtl: false,
      size: 'md',
      showClear: false,
      showCaption: false,
      defaultCaption: '{rating} Stars',
      starCaptions: {
          0.5: 'Half Star',
          1: 'One Star',
          1.5: 'One & Half Star',
          2: 'Two Stars',
          2.5: 'Two & Half Stars',
          3: 'Three Stars',
          3.5: 'Three & Half Stars',
          4: 'Four Stars',
          4.5: 'Four & Half Stars',
          5: 'Five Stars'
      },
      starCaptionClasses: {
          0.5: 'label label-danger',
          1: 'label label-danger',
          1.5: 'label label-warning',
          2: 'label label-warning',
          2.5: 'label label-info',
          3: 'label label-info',
          3.5: 'label label-primary',
          4: 'label label-primary',
          4.5: 'label label-success',
          5: 'label label-success'
      },
      clearButton: '<i class="glyphicon glyphicon-minus-sign"></i>',
      clearButtonTitle: 'Clear',
      clearButtonBaseClass: 'clear-rating',
      clearButtonActiveClass: 'clear-rating-active',
      clearCaption: 'Not Rated',
      clearCaptionClass: 'label label-default',
      clearValue: 0,
      captionElement: null,
      clearElement: null,
      containerClass: null
  };//評等 改default
  
  </script>
    <div class="main">
    <div id="drmenu">
    <uc1:menu runat="server" ID="menu" />
    </div>
    <div id="dataside">
             <h3>醫療團隊</h3>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Staff_ID" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="Staff_Name" HeaderText="姓名" SortExpression="Staff_Name" >
                <HeaderStyle Width="80px" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="科別" SortExpression="Div_ID">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Div_ID") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# ClassUtility.getDivTitles((int)Eval("Div_ID")) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle Width="80px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="職稱" SortExpression="Job_ID" Visible="False">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Job_ID") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# ClassUtility.getJobTitles((int)Eval("Job_ID")) %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Staff_Skill" HeaderText="專長" SortExpression="Staff_Skill" >
                <HeaderStyle Width="300px" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="詳細資料" InsertVisible="False" SortExpression="Staff_ID">
                    <EditItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("Staff_ID") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "DoctorDetail.aspx?Staff_ID="+Eval("Staff_ID") %>'>醫師資料</asp:HyperLink>
                    </ItemTemplate>
                    <HeaderStyle Width="80px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="看診評價" SortExpression="Staff_ID">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Staff_ID") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <input id="input-21e" value='<%# ClassUtility.getStaffEvalution((int)Eval("Staff_ID")) %>' type="number" class="rating"  data-disabled="true" min="0" max="5" step="0.5" data-size="xs" readonly="true" showCaption="false" />
                    </ItemTemplate>
                    <ItemStyle Height="40px" />
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
             </asp:GridView>

             <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=.;Initial Catalog=Medicare;Integrated Security=True" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [Staff_ID], [Staff_Name], [Job_ID], [Div_ID], [Staff_Skill] FROM [Staffs] WHERE (([Div_ID] = @Div_ID) AND ([Job_ID] = @Job_ID))">
                 <SelectParameters>
                     <asp:QueryStringParameter Name="Div_ID" QueryStringField="divID" Type="Int32" />
                     <asp:Parameter DefaultValue="1" Name="Job_ID" Type="Int32" />
                 </SelectParameters>
             </asp:SqlDataSource>


      </div>
   </div>
 
</asp:Content>

